//package com.fecean.aabbc.netty.server.prod2;
//
//import com.fecean.aabbc.netty.message2.NettyMessageBuilder;
//import io.netty.channel.ChannelHandler;
//import io.netty.channel.ChannelHandlerContext;
//import io.netty.channel.ChannelInboundHandlerAdapter;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
///**
// * NettyServerBusinessHandler
// *
// * @author: chenfenghai
// * @version: 1.0
// * @date: 2020-03-05 15:59
// * @blame Team
// */
//@Slf4j
//@Component
//@ChannelHandler.Sharable
//public class NettyServerBusinessHandler extends ChannelInboundHandlerAdapter {
//
//    @Override
//    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//        NettyMessageBuilder messageBuilder = NettyMessageBuilder.readMessage(msg);
//        if(messageBuilder.isBusinessMessage()){
//            log.info("服务端收到信息[{}-{}]：{}",
//                    messageBuilder.getNettyMessage().getTenantId(),
//                    messageBuilder.getNettyMessage().getCinemaCode(),
//                    messageBuilder.getNettyMessage());
//
//            // TODO 处理业务
//
//        }else{
//            ctx.fireChannelRead(msg);
//        }
//    }
//}
